﻿using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Godot.core
{
    public abstract class ScriptLanguage
    {
        public abstract string name { get; }
	
	    /* LANGUAGE FUNCTIONS */
	    public abstract void init();	
	    public abstract string type { get; }
	    public abstract string extension { get; }
        public abstract Error execute_file(string p_path);	
	    public abstract void finish();	

	    /* EDITOR FUNCTIONS */
	    public abstract ReadOnlyCollection<string> reserved_words { get; }
        public abstract ReadOnlyCollection<string> comment_delimiters { get; }
        public abstract ReadOnlyCollection<string> string_delimiters { get; }
        public abstract string get_template(string p_class_name, string p_base_class_name);
        public abstract bool validate(string p_script, int r_line_error, int r_col_error, string r_test_error, string p_path = "", List<string> r_functions = null);
	    public abstract Script create_script();
	    public abstract bool has_named_classes();
        public abstract int find_function(string p_function, string p_code);
        public abstract string make_function(string p_class, string p_name, string[] p_args);
        public virtual Error complete_keyword(string p_code, int p_line, string p_base_path, string p_keyword, List<string> r_options) 
        { 
            return Error.ERR_UNAVAILABLE; 
        }

	    /* DEBUGGER FUNCTIONS */
        /*
	    public virtual String debug_get_error() =0;
	    public virtual int debug_get_stack_level_count() =0;
	    public virtual int debug_get_stack_level_line(int p_level) =0;
	    public virtual String debug_get_stack_level_function(int p_level) =0;
	    public virtual String debug_get_stack_level_source(int p_level) =0;
	    public virtual void debug_get_stack_level_locals(int p_level,List<String> *p_locals, List<Variant> *p_values, int p_max_subitems=-1,int p_max_depth=-1)=0;
	    public virtual void debug_get_stack_level_members(int p_level,List<String> *p_members, List<Variant> *p_values, int p_max_subitems=-1,int p_max_depth=-1)=0;
	    public virtual void debug_get_globals(List<String> *p_locals, List<Variant> *p_values, int p_max_subitems=-1,int p_max_depth=-1)=0;
	    public virtual String debug_parse_stack_level_expression(int p_level, String p_expression,int p_max_subitems=-1,int p_max_depth=-1)=0;
        */
	    /* LOADER FUNCTIONS */

        public abstract ReadOnlyCollection<string> recognized_extensions { get; }
	    public abstract ReadOnlyCollection<MethodInfo> public_functions { get; }
        public abstract ReadOnlyCollection<KeyValuePair<string, Variant>> public_ants { get; }

	    public virtual void frame() {}
    }
}
